//
//  ProductSKUCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/8/4.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "ProductSKUCell.h"

@implementation ProductSKUCell

- (void)awakeFromNib {
    [super awakeFromNib];

    self.layer.cornerRadius = 4.0f;
    self.layer.borderWidth = 1;

}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.layer.cornerRadius = 4.0f;
    self.layer.borderWidth = 1;
}

- (void)fillCellWithModel:(CommonSkuModel *)model {
    
    self.skuNameLab.text = model.specName;
    
    if (model.isSelect) {
        self.skuNameLab.textColor = UIColorHex(0xff2442);
        self.layer.borderColor = UIColorHex(0xff2442).CGColor;
    } else {
        self.skuNameLab.textColor = UIColorHex(0x333333);
        self.layer.borderColor = UIColorHex(0xf1f1f1).CGColor;
    }
    
}

- (void)setCellType:(ProductSKUSelType)selType {

    switch (selType) {
        case ProductSKUSelType_sel:{
            
            self.skuNameLab.textColor = UIColorHex(0xff2442);
            self.layer.borderColor = UIColorHex(0xff2442).CGColor;
            
        } break;
        case ProductSKUSelType_nor:{
            
            self.skuNameLab.textColor = UIColorHex(0x333333);
            self.layer.borderColor = UIColorHex(0xf1f1f1).CGColor;
            
        } break;
        case ProductSKUSelType_stop:{
            
            self.skuNameLab.textColor = UIColorHex(0xcccccc);
            self.layer.borderColor = UIColorHex(0xf7f7f7).CGColor;
            
        } break;
        default:
            break;
    }
    
    

    
}

@end
